<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%@page contentType="text/html; charset=UTF-8" import="java.util.*, user.*"%>
<%@ page import="java.sql.*"%> 

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%  
	String username = session.getAttribute("username").toString();  
	String address = request.getParameter("clientCheckout_streetField");
	String name = request.getParameter("clientCheckout_receiverName");
	String phone = request.getParameter("clientCheckout_cell");	
	String quantity = request.getParameter("food_quantity");	
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>"> 
    <title>My JSP 'DisplayInvoicePage.jsp' starting page</title>
  </head>
  
  <body>
  	<p align="center">	
  	<a href="index.jsp">
    <img src="Pics/restaurantLogo.JPG" alt="restaurantLogo" width="242" height="118" border="0" />
    </a>
    </p>
    <br>
    <th><center>Thank you very much for your order.</center></th>
    <th><center>Customer Information</center></th>    
    <table width="50%" align="center" border="1">
	<tr bgcolor="#666666\">
	<th width="100" bgcolor="#CCCCCC" scope="col">Name</th>
	<th width="100" bgcolor="#CCCCCC" scope="col">Phone</th>
	<th width="100" bgcolor="#CCCCCC" scope="col">Address</th>
	</tr>
	<tr><td><%= name %></td><td><%= phone %></td><td><%= address %></td></tr>
	</table>	

    <br><br>
    <th><center>Food in Order</center></th>
    <%= DisplayCustomerInvoice.DisplayInvoiceAndUpdateDatabase(username, name, phone, address, quantity) %><br>
    
    <form action ="./customer_account.jsp" method ="get"/>
    <center><input type= "submit" value = "Back to Account" name = "submit" /> </center>
	</form>
  </body>
</html>


